//
//  SixTableViewCell.m
//  AliBall
//
//  Created by 殷殷明静 on 16/8/16.
//  Copyright © 2016年 殷明静. All rights reserved.
//

#import "SixTableViewCell.h"

@implementation SixTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {

    }
    return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
    layout.itemSize = CGSizeMake(98, 130);
    layout.minimumLineSpacing = 5;
    layout.minimumInteritemSpacing = 20;
    _collect = [[UICollectionView alloc] initWithFrame:CGRectMake(20, 0,375 - 40, self.contentView.frame.size.height) collectionViewLayout:layout];
    [self.contentView addSubview:_collect];
    [_collect registerNib:[UINib nibWithNibName:@"DetailCollectionViewCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"coll"];
    _collect.scrollEnabled = NO;
    _collect.delegate = self;
    _collect.dataSource = self;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return 3;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    DetailCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"coll" forIndexPath:indexPath];
    return cell;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
